"use strict";
const common_vendor = require("../common/vendor.js");
let config = "http://localhost:3000";
const request = (url, data = {}, method = "GET") => {
  return new Promise((resolve, reject) => {
    common_vendor.wx$1.request({
      url: config + url,
      data,
      header: {
        cookie: "MUSIC_U=200f728d33aa825c192e6ec11ebb811591682487c439966f30eefeb5279efa619fe0240d96d3c20aeaee740502d8e77a4f0661b6a670c3336dee108ffa25353140544341ff11443dd4dbf082a8813684; Max-Age=1296000; Expires=Sat, 09 Jul 2022 02:49:05 GMT; Path=/; Domain=.music.163.com; HTTPOnly"
      },
      method,
      success: (res) => {
        resolve(res.data);
      },
      fail: (err) => {
        reject(err);
      }
    });
  });
};
exports.request = request;
